package com.jie.utils;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * 日期格式化类
 * @Author: 杰
 * @Project :net-disk
 * @DateTime: 2024/4/26 16:22
 **/
public class LocalDateTimeUtil {

    public static String getDateTimeDay(){
        LocalDateTime dateTime = LocalDateTime.now();
        return DateTimeFormatter.ofPattern("yyyy-MM-dd").format(dateTime)+":";
    }
    public static String getDateTimeMedium(){
        LocalDateTime dateTime = LocalDateTime.now();
        return DateTimeFormatter.ofPattern("yyyy-MM-dd HH").format(dateTime)+":";
    }
    public static String getDateTimSecond(){
        LocalDateTime dateTime = LocalDateTime.now();
        return DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm").format(dateTime)+":";
    }
}
